home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
pascal
/
prftest.exe
/
PROFTEST.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-04-14
|
2KB
|
58 lines
Program ProfTest;
{========================================================}
{===== This code tests the ProfUnit functions. =====}
{===== =====}
{===== Copyright(c) 1992 Wm Potvin II =====}
{========================================================}
Uses
ProfUnit;
Var
Test : Boolean;
MERBuffer : ProfStr;
TestInt : Integer;
Index : Integer;
MERProfileArray: StrArray;
{***** Main Line code to test functions *****}
begin
WriteLn('Testing the WriteDOSProfileString function...');
Test := WriteDOSProfileString('MARYMER',
'MARY',
'MUNCHKIN',
'MERTEST.INI');
if NOT Test then
WriteLn('Error writing to file...')
else
WriteLn('File write Ok.');
ReadLn;
WriteLn('Testing the GetDOSProfileString function...');
TestInt := GetDosProfileString('MARYMER',
'MARY',
'nil',
MERBuffer,
SizeOf(MERBuffer),
'MERTEST.INI');
WriteLn(TestInt, ' Bytes read from the buffer:');
WriteLn(MerBuffer);
ReadLn;
WriteLn('Testing the ParseProfileString function...');
TestInt := ParseProfileString(MERBUFFER,
MERProfileArray);
WriteLn('Contents of the buffer:');
for Index := 0 to TestInt - 1 do
Writeln(MERProfileArray[Index]);
WriteLn('Done. Press <RETURN> to quit.');
ReadLn;
end.